programming4us
           
 
 
Sharepoint

Sharepoint 2010 : Creating a .NET Connector in Visual Studio 2010 (part 2) - BDC Modeling Tools & Defining the BDC Model

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
4/24/2012 3:35:14 PM

5. BDC Modeling Tools

After defining the entity and service, the BDC model can be created. The BDC model defines how to connect to the data source and how it can be queried. It also defines the type of information it returns. The BDC Explorer and the BDC Designer are used to define the BDC model. Both of these new VS 2010 components are described ahead.

5.1. BDC Explorer

VS 2010 extends the windows list with the BDC Explorer, shown in Figure 4. This window is used to create or edit the BDC model.

Figure 4. BDC Explorer showing the BDC model

Just like with Solution Explorer and class view windows, the BDC Explorer is linked to the Properties window. It shows the relevant properties allowing the developer to view and edit the BDC model. Figure 5 demonstrates this. When Identifier 1 is selected in the BDC Explorer, the corresponding properties are displayed in the Properties window.

Figure 5. Entity properties displayed beneath the BDC Explorer

.5.2. BDC Designer

VS 2010 includes the BDC Designer (Figure 6). This designer window allows the developer to create and edit a BDC model. The BDC Designer works the same way as the BDC Explorer regarding the Properties window.

Figure 6. A BDC entity displayed in the BDC Designer

6. Defining the BDC Model

Defining a BDC model is essentially to define the mapping between your .NET Assembly Connector and the BDC. In this series of steps, the mappings between the .NET Assembly Connector and the BDC are defined. To create the mapping, double-click the BDC Explorer to open the BDCModel1.bdcm file in Solution Explorer. The BDC Designer will then open and be visible. From the View menu, select Other Windows. Then click BDC Explorer to open the window.

6.1. Configuring the BDC Model and LOB System

Rename the BDC model to ZipCodesModel, as shown in Figure 7. Right-click the second node from the top, named BdcModel1, and click Properties. Change the Name property to ZipCodesModel in the Properties window.

Figure 7. Renaming the BDC model

The third node from the top (the LOB system) should also be renamed. Change the Name property to ZipCodesLOBSystem using the Properties window, as shown in Figure 8.

Figure 8. Renaming the LOB system

The fifth node from the top (the LOB system instance) should be renamed to ZipCodesLOBSystemInstance by using the Properties window to change its Name property, as shown in Figure 9.

Figure 9. Renaming the LOB system instance

The ShowInSearchUI property on the ZipCodesLOBSystemInstance must be set to allow the ZipCodesLOBSystemInstance to be crawled and searched by the SharePoint search service. If the LOBSystemInstance should not be crawled or searched, this property does not need to be changed. To set the ShowInSearchUI property on the ZipCodesLOBSystemInstance, click the ZipCodesLOBSystemInstance node in the BDC Explorer. Then click the button in the Custom Properties row in the Properties window. Use the Properties Editor to set the ShowInSearchUI property. Give it the data type System.String and set the value to x, as shown in Figure 10. Click OK.

Figure 10. Adding the ShowInSearchUI property to the LOB system instance

6.2. Configuring the Entity and Entity Methods

The BDC model entity should be renamed to match the entity defined in the .NET Assembly Connector. This is done by selecting Entity1 from the BDC Explorer. Then change the Name property to ZipCodesEntity in the Properties window, as shown in Figure 11.

Figure 11. Renaming the BDC model entity

The RootFinder property on the Finder method must be set to specify the Finder method used to enumerate the items to crawl. If the Finder method shouldn't be used for crawling, this property can be ignored and left unset. The RootFinder property on the Finder method is set in the BDC Explorer by clicking the ReadList node. After that, click the button in the Custom Properties row in the Properties window. Add the RootFinder property, with a data type of System.String and a value of x in the Properties Editor, as shown in Figure 12.

Figure 12. Adding the RootFinder property to the Finder method

Next, the identifier for the Finder method return parameter is set for the entity. This is done by selecting the Identifier1 node under the Finder method return parameter for the ZipCodesEntity. Then, in the Properties window, change the Name property to ZipCode, as shown in Figure 13.

Figure 13. Renaming the Finder method

Next, set the identifier for the specific Finder method return parameter and the input parameter in the entity. To do so, first select the Identifier1 nodes under the specific Finder method return parameter for the ZipCodesEntity. Then, in the Properties window, change the Name property to ZipCode, as shown in Figure 14.

Figure 14. Renaming the Finder method return parameter

Right-click Identifier1, and select Rename in the BDC Designer (Figure 15). Change the identifier to ZipCode.

Figure 15. Renaming the BDC model in Designer view

The message parameters are not needed, so they should be removed. Right-click the message parameter on the Finder method, and select Delete. This removes the Message node from the BDC Explorer. Repeat this on the specific Finder method. Alternatively delete the entity, and recreate a new "empty" entity.

6.3. Adding Parameters to Map the Data Source

Parameters must be added that map to the data in the zipcodes text file data source. In this example, the only parameter to map is the city name.

In the BDC Explorer, right-click Entity1 and select Add Type Descriptor. In the Properties window, change the Name property to City and the Type Name property to System.String, as shown in Figure 16. Repeat this for the Finder and the Specific Finder methods.

Figure 16. Adding parameters to the Finder and Specific Finder methods

6.4. Configuring the Finder Method Instance

The method instance properties are configured from the BDC Method Details window. This window is also new in VS 2010. Selecting a method in the BDC Designer will display the corresponding method instances in the BDC Method Details window, as shown in Figure 17.

Figure 17. Configuring the Finder method instance

The Finder method is specified by setting the RootFinder property on the Finder method instance. It specifies that this instance is used to enumerate the items to crawl. If the Finder method instance is not to be used for crawling, this property can be ignored and left unset. Click the ReadList node in the BDC Method Details window. To set the RootFinder property on the Finder method instance, click the button in the Custom Properties row in the Properties window. Add the RootFinder property. Set the data type as System.String, and set the value to x, as shown in Figure 18.

Figure 18. Adding the RootFinder property to the Finder method instance

If the data source contained data suitable for incremental crawls, the LastModifiedTimeStampField property on the Finder method instance could also be set. This is not feasible in this example.

7. Deployment

Deploying the .NET Assembly Connector is made easy in Visual Studio 2010. Open the Build menu on the top bar, and click Deploy Solution. Now VS 2010 begins to compile and packages the .NET Assembly Connector code, BDC model, and the feature. Finally it creates a WSP, which is the package type used for deploying solutions to SharePoint.

The WSP package is then deployed to the specified SharePoint site. The feature is activated, which registers the external content type associated with this .NET Assembly Connector.

Other -----------------
- Sharepoint 2007 : Associate a Workflow with a List or Library
- Sharepoint 2007 : Track the Progress of a Workflow
- Sharepoint 2007 : Start a Workflow
- Sharepoint 2007 : Create an Event with a Website
- Sharepoint 2007 : Create a Subsite
- Working with Search Page Layouts : Advanced Topics on Refinement Panel
- PerformancePoint Services 2010 (part 3) - Upgrading PerformancePoint Server 2007 & Migrating Content to Another SharePoint 2010 Location
- PerformancePoint Services 2010 (part 2) - Installing and Configuring PerformancePoint Services 2010
- PerformancePoint Services 2010 (part 1) - Understanding the Architecture of PerformancePoint Services 2010
- Working with Search Page Layouts : Modify the Search Results Presentation (part 2)
- Working with Search Page Layouts : Modify the Search Results Presentation (part 1)
- Working with Search Page Layouts : Applying a Branded Master Page to a Search Center
- SharePoint 2010 : Excel Services - User-Defined Functions
- SharePoint 2010 : Using the Excel Services REST API
- SharePoint 2010 : Social Sites: Providing a Structure for Collaborative Conversations
- SharePoint 2010 : Social Data: Enhancing Value with User Contributed Content
- Sharepoint 2010 : Excel Service - Demonstration Scenario (part 3)
- Sharepoint 2010 : Excel Service - Demonstration Scenario (part 2)
- Sharepoint 2010 : Excel Service - Demonstration Scenario (part 1)
- Working with Search Page Layouts : Adding Navigation to the Search Center (part 2)
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us